import request from "../utils/request.js"

export function getPersonalInfoFull(params) {
  return request({
    url: '/user/getPersonalInfoFull',
    method: 'get',
    data: params
  })
}

export function updatePersonalInfo(params) {
  return request({
    url: '/user/updatePersonalInfo',
    method: 'post',
    data: params
  })
}

export function getPersonalIntro(params) {
  return request({
    url: '/user/getPersonalIntro',
    method: 'get',
    data: params
  })
}

export function getMoreTeacher(params) {
  return request({
    url: '/user/getMoreTeacher',
    method: 'post',
    data: params
  })
}

export function getTeacherDetail(params) {
  return request({
    url: '/user/getTeacherDetail',
    method: 'get',
    data: params
  })
}

export function getRecommendTeacher(params) {
  return request({
    url: '/user/getRecommendTeacher',
    method: 'post',
    data: params
  })
}

export function getMine(params) {
  return request({
    url: '/user/getMine',
    method: 'get'
  })
}

export function saveBaseInfo(params) {
  return request({
    url: '/user/signup/saveBaseInfo',
    method: 'post',
    data: params
  })
}

export function saveNormalStudent(params) {
  return request({
    url: '/user/signup/saveNormalStudent',
    method: 'post',
    data: params
  })
}

export function saveTeacher(params) {
  return request({
    url: '/user/signup/saveTeacher',
    method: 'post',
    data: params
  })
}

export function submitNormalStudentAuthApply(params) {
  return request({
    url: '/user/submitNormalStudentAuthApply',
    method: 'post',
    data: params
  })
}

export function submitTeacherAuthApplyDto(params) {
  return request({
    url: '/user/submitTeacherAuthApplyDto',
    method: 'post',
    data: params
  })
}

export function getMajorTree() {
  return request({
    url: '/user/getMajorTree',
    method: 'get'
  })
}

export function getOpRecommendUser() {
  return request({
    url: '/user/getOpRecommendUser',
    method: 'get'
  })
}

export function pageTeacher(params) {
  return request({
    url: '/user/pageTeacher',
    method: 'post',
    data: params
  })
}

export function xiuShuLiHun() {
  return request({
    url: '/user/xiuShuLiHun',
    method: 'get'
  })
}

export function saveXiuShuLiHun(params) {
  return request({
    url: '/user/saveXiuShuLiHun',
    method: 'get',
    data: params
  })
}

export function myFollowedDynamic(params) {
  return request({
    url: '/user/myFollowedDynamic',
    method: 'post',
    data: params
  })
}

export function getFollowedList(params) {
  return request({
    url: '/user/followed',
    method: 'post',
    data: params
  })
}

export function getFansList(params) {
  return request({
    url: '/user/fans',
    method: 'post',
    data: params
  })
}

export function groups(params) {
  return request({
    url: '/user/groups',
    method: 'get'
  })
}

export function createGroup(params) {
  return request({
    url: '/user/createGroup',
    method: 'post',
    data: params,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function follow(params) {
  return request({
    url: '/user/follow',
    method: 'post',
    data: params,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function cancelFollow(params) {
  return request({
    url: '/user/cancelFollow',
    method: 'post',
    data: params,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function getZone() {
  return request({
    url: '/user/getZone',
    method: 'get'
  })
}

export function updateZone(params) {
  return request({
    url: '/user/updateZone',
    method: 'post',
    data: params
  })
}

export function userGetPhoneNumber(params) {
  return request({
    url: '/user/getPhoneNumber',
    method: 'post',
    data: params
  })
}

// 修改个人资料
export function updateUserArea(params) {
  return request({
    url: '/user/updateUserArea',
    method: 'put',
    data: { areaCode: params },
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function updateUserAvatar(params) {
  return request({
    url: '/user/updateUserAvatar',
    method: 'put',
    data: { avatarUrl: params },
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function updateUserEmail(params) {
  return request({
    url: '/user/updateUserEmail',
    method: 'put',
    data: { email: params },
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function updateUserFocus(params) {
  return request({
    url: '/user/updateUserFocus',
    method: 'post',
    data: params
  })
}

export function updateUserGoodAt(params) {
  return request({
    url: '/user/updateUserGoodAt',
    method: 'post',
    data: params
  })
}

export function updateUserIdCard(params) {
  return request({
    url: '/user/updateUserIdCard',
    method: 'post',
    data: params
  })
}

export function updateUserMobileNumber(params) {
  return request({
    url: '/user/updateUserMobileNumber',
    method: 'put',
    data: params
  })
}

export function updateUserName(params) {
  return request({
    url: '/user/updateUserName',
    method: 'put',
    data: { name: params },
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function updateUserSchool(params) {
  return request({
    url: '/user/updateUserSchool',
    method: 'put',
    data: params,
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function updateUserSex(params) {
  return request({
    url: '/user/updateUserSex',
    method: 'put',
    data: { sex: params },
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}

export function updateUserStudentCert(params) {
  return request({
    url: '/user/updateUserStudentCert',
    method: 'post',
    data: params
  })
}

export function updateUserSubject(params) {
  return request({
    url: '/user/updateUserSubject',
    method: 'post',
    data: params
  })
}

export function updateUserPhase(params) {
  return request({
    url: '/user/updateUserPhase',
    method: 'post',
    data: params
  })
}

export function updateUserTeacherCert(params) {
  return request({
    url: '/user/updateUserTeacherCert',
    method: 'post',
    data: params
  })
}

export function updateUserTrainSpeciality(params) {
  return request({
    url: '/user/updateUserTrainSpeciality',
    method: 'post',
    data: params
  })
}

export function updateUserZyz(params) {
  return request({
    url: '/user/updateUserZyz',
    method: 'post',
    data: params
  })
}

export function changeIdTypeToTeacher() {
  return request({
    url: '/user/changeIdTypeToTeacher',
    method: 'put',
    header: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
